<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
<head>
<title>Class: tinymce.EditorManager</title>
<meta name="generator" content="MoxieDoc" />

<link rel="stylesheet" type="text/css" href="css/reset.css" />
<link rel="stylesheet" type="text/css" href="css/grids.css" />
<link rel="stylesheet" type="text/css" href="css/general.css" />

<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript">
	google.load("jquery", "1.3");
</script>
<script type="text/javascript" src="js/jquery.treeview.min.js"></script>
<script type="text/javascript" src="js/general.js"></script>
</head>
<body>
<div class="classDetailsContent">
<h1>tinymce.EditorManager</h1>
<table class="classDetails">
<tr>
<td class="first">Namespace</td>
<td class="last">tinymce</td>
</tr>
<tr>
<td class="first">Class</td>
<td class="last">EditorManager</td>
</tr>
<tr>
<td class="first">Type</td>
<td class="last">Singleton</td>
</tr>
</table>
<div class="classDescription">This class is used to create multiple editor instances and contain them in a collection. So it's both a factory and a manager for editor instances.
</div>
<div class="summaryLists">
<h2>Public Properties</h2>
<table class="Properties summary">
<thead>
<tr>
<th>Property</th>
<th>Defined By</th>
</tr>
</thead>
<tbody>
<tr>
<td class="first">
<div>
<a class="memberName" href="class_tinymce.EditorManager.html#activeEditor">activeEditor</a> : <a href="class_tinymce.Editor.html">Editor</a>
</div>
<div class="summary">
<span class="static">[static] </span>Currently active editor instance.</div>
</td>
<td class="last">EditorManager</td>
</tr>
<tr class="even">
<td class="first">
<div>
<a class="memberName" href="class_tinymce.EditorManager.html#editors">editors</a> : Object</div>
<div class="summary">
<span class="static">[static] </span>Collection of editor instances.</div>
</td>
<td class="last">EditorManager</td>
</tr>
</tbody>
</table>
<h2>Public Methods</h2>
<table class="Methods summary">
<thead>
<tr>
<th>Method</th>
<th>Defined By</th>
</tr>
</thead>
<tbody>
<tr>
<td class="first">
<div>
<a class="memberName" href="class_tinymce.EditorManager.html#add">add</a>(e:<a href="class_tinymce.Editor.html">Editor</a>):<a href="class_tinymce.Editor.html">Editor</a>
</div>
<div class="summary">
<span class="static">[static] </span>Adds an editor instance to the editor collection.</div>
</td>
<td class="last">EditorManager</td>
</tr>
<tr class="even">
<td class="first">
<div>
<a class="memberName" href="class_tinymce.EditorManager.html#addI18n">addI18n</a>(p:String, o:Object):void</div>
<div class="summary">
<span class="static">[static] </span>Adds a language pack, this gets called by the loaded language files like en.</div>
</td>
<td class="last">EditorManager</td>
</tr>
<tr>
<td class="first">
<div>
<a class="memberName" href="class_tinymce.EditorManager.html#execCommand">execCommand</a>(c:String, u:Boolean, v:String):Boolean</div>
<div class="summary">
<span class="static">[static] </span>Executes a specific command on the currently active editor.</div>
</td>
<td class="last">EditorManager</td>
</tr>
<tr class="even">
<td class="first">
<div>
<a class="memberName" href="class_tinymce.EditorManager.html#execInstanceCommand">execInstanceCommand</a>(id:String, c:String, u:Boolean, v:String):Boolean</div>
<div class="deprecated">
					Deprecated: Use the execCommand method of a editor instance instead.</div>
</td>
<td class="last">EditorManager</td>
</tr>
<tr>
<td class="first">
<div>
<a class="memberName" href="class_tinymce.EditorManager.html#get">get</a>(id:String):<a href="class_tinymce.Editor.html">Editor</a>
</div>
<div class="summary">
<span class="static">[static] </span>Returns a editor instance by id.</div>
</td>
<td class="last">EditorManager</td>
</tr>
<tr class="even">
<td class="first">
<div>
<a class="memberName" href="class_tinymce.EditorManager.html#getInstanceById">getInstanceById</a>(id:String):<a href="class_tinymce.Editor.html">Editor</a>
</div>
<div class="deprecated">
					Deprecated: Use get method instead.</div>
</td>
<td class="last">EditorManager</td>
</tr>
<tr>
<td class="first">
<div>
<a class="memberName" href="class_tinymce.EditorManager.html#init">init</a>(s:Object):void</div>
<div class="summary">
<span class="static">[static] </span>Initializes a set of editors.</div>
</td>
<td class="last">EditorManager</td>
</tr>
<tr class="even">
<td class="first">
<div>
<a class="memberName" href="class_tinymce.EditorManager.html#preInit">preInit</a>():void</div>
<div class="summary">
<span class="static">[static] </span>Preinitializes the EditorManager class.</div>
</td>
<td class="last">EditorManager</td>
</tr>
<tr>
<td class="first">
<div>
<a class="memberName" href="class_tinymce.EditorManager.html#remove">remove</a>(e:<a href="class_tinymce.Editor.html">Editor</a>):<a href="class_tinymce.Editor.html">Editor</a>
</div>
<div class="summary">
<span class="static">[static] </span>Removes a editor instance from the collection.</div>
</td>
<td class="last">EditorManager</td>
</tr>
<tr class="even">
<td class="first">
<div>
<a class="memberName" href="class_tinymce.EditorManager.html#triggerSave">triggerSave</a>():void</div>
<div class="summary">
<span class="static">[static] </span>Calls the save method on all editor instances in the collection.</div>
</td>
<td class="last">EditorManager</td>
</tr>
</tbody>
</table>
</div>
<div class="detailsList">
<div class="details">
<h2>Property details</h2>
<div class="memberDetails" id="activeEditor">
<h3>activeEditor<span class="memberType">property</span>
</h3>
<code class="syntax">public static activeEditor : <a href="class_tinymce.Editor.html">Editor</a>
</code>
<div class="memberDescription">Currently active editor instance.
</div>
</div>
<div class="memberDetails last" id="editors">
<h3>editors<span class="memberType">property</span>
</h3>
<code class="syntax">public static editors : Object</code>
<div class="memberDescription">Collection of editor instances.
</div>
</div>
</div>
<div class="details">
<h2>Method details</h2>
<div class="memberDetails" id="add">
<h3>add<span class="memberType">method</span>
</h3>
<code class="syntax">public static 
						function add(e:<a href="class_tinymce.Editor.html">Editor</a>):<a href="class_tinymce.Editor.html">Editor</a>
</code>
<div class="memberDescription">Adds an editor instance to the editor collection. This will also set it as the active editor.
</div>
<h4>Parameters</h4>
<table class="params">
<tr>
<td class="first">e:<a href="class_tinymce.Editor.html">Editor</a>
</td>
<td class="last">Editor instance to add to the collection.</td>
</tr>
</table>
<h4>Returns</h4>
<div class="returns">
<a href="class_tinymce.Editor.html">Editor</a> - The same instance that got passed in.</div>
</div>
<div class="memberDetails" id="addI18n">
<h3>addI18n<span class="memberType">method</span>
</h3>
<code class="syntax">public static 
						function addI18n(p:String, o:Object):void</code>
<div class="memberDescription">Adds a language pack, this gets called by the loaded language files like en.js.
</div>
<h4>Parameters</h4>
<table class="params">
<tr>
<td class="first">p:String</td>
<td class="last">Prefix for the language items. For example en.myplugin</td>
</tr>
<tr>
<td class="first">o:Object</td>
<td class="last">Name/Value collection with items to add to the language group.</td>
</tr>
</table>
</div>
<div class="memberDetails" id="execCommand">
<h3>execCommand<span class="memberType">method</span>
</h3>
<code class="syntax">public static 
						function execCommand(c:String, u:Boolean, v:String):Boolean</code>
<div class="memberDescription">Executes a specific command on the currently active editor.
</div>
<h4>Parameters</h4>
<table class="params">
<tr>
<td class="first">c:String</td>
<td class="last">Command to perform for example Bold.</td>
</tr>
<tr>
<td class="first">u:Boolean</td>
<td class="last">Optional boolean state if a UI should be presented for the command or not.</td>
</tr>
<tr>
<td class="first">v:String</td>
<td class="last">Optional value parameter like for example an URL to a link.</td>
</tr>
</table>
<h4>Returns</h4>
<div class="returns">Boolean - true/false if the command was executed or not.</div>
</div>
<div class="memberDetails" id="execInstanceCommand">
<h3>execInstanceCommand<span class="memberType">method</span>
</h3>
<code class="syntax">public static 
						function execInstanceCommand(id:String, c:String, u:Boolean, v:String):Boolean</code>
<div class="deprecated">
					Deprecated: Use the execCommand method of a editor instance instead.</div>
<div class="memberDescription">Executes a command on a specific editor by id. This method was added for compatibility with the 2.x branch.
</div>
<h4>Parameters</h4>
<table class="params">
<tr>
<td class="first">id:String</td>
<td class="last">Editor id to perform the command on.</td>
</tr>
<tr>
<td class="first">c:String</td>
<td class="last">Command to perform for example Bold.</td>
</tr>
<tr>
<td class="first">u:Boolean</td>
<td class="last">Optional boolean state if a UI should be presented for the command or not.</td>
</tr>
<tr>
<td class="first">v:String</td>
<td class="last">Optional value parameter like for example an URL to a link.</td>
</tr>
</table>
<h4>Returns</h4>
<div class="returns">Boolean - true/false if the command was executed or not.</div>
</div>
<div class="memberDetails" id="get">
<h3>get<span class="memberType">method</span>
</h3>
<code class="syntax">public static 
						function get(id:String):<a href="class_tinymce.Editor.html">Editor</a>
</code>
<div class="memberDescription">Returns a editor instance by id.
</div>
<h4>Parameters</h4>
<table class="params">
<tr>
<td class="first">id:String</td>
<td class="last">Editor instance id to return.</td>
</tr>
</table>
<h4>Returns</h4>
<div class="returns">
<a href="class_tinymce.Editor.html">Editor</a> - Editor instance to return.</div>
</div>
<div class="memberDetails" id="getInstanceById">
<h3>getInstanceById<span class="memberType">method</span>
</h3>
<code class="syntax">public static 
						function getInstanceById(id:String):<a href="class_tinymce.Editor.html">Editor</a>
</code>
<div class="deprecated">
					Deprecated: Use get method instead.</div>
<div class="memberDescription">Returns a editor instance by id. This method was added for compatibility with the 2.x branch.
</div>
<h4>Parameters</h4>
<table class="params">
<tr>
<td class="first">id:String</td>
<td class="last">Editor instance id to return.</td>
</tr>
</table>
<h4>Returns</h4>
<div class="returns">
<a href="class_tinymce.Editor.html">Editor</a> - Editor instance to return.</div>
<h4>See Also</h4>
<ul class="see">
<li>
<a href="class_tinymce.EditorManager.html#get">get</a>
</li>
</ul>
</div>
<div class="memberDetails" id="init">
<h3>init<span class="memberType">method</span>
</h3>
<code class="syntax">public static 
						function init(s:Object):void</code>
<div class="memberDescription">Initializes a set of editors. This method will create a bunch of editors based in the input.
</div>
<h4>Parameters</h4>
<table class="params">
<tr>
<td class="first">s:Object</td>
<td class="last">Settings object to be passed to each editor instance.</td>
</tr>
</table>
</div>
<div class="memberDetails" id="preInit">
<h3>preInit<span class="memberType">method</span>
</h3>
<code class="syntax">public static 
						function preInit():void</code>
<div class="memberDescription">Preinitializes the EditorManager class. This method will be called automatically when the page loads and it
will setup some important paths and URIs and attach some document events.
</div>
</div>
<div class="memberDetails" id="remove">
<h3>remove<span class="memberType">method</span>
</h3>
<code class="syntax">public static 
						function remove(e:<a href="class_tinymce.Editor.html">Editor</a>):<a href="class_tinymce.Editor.html">Editor</a>
</code>
<div class="memberDescription">Removes a editor instance from the collection.
</div>
<h4>Parameters</h4>
<table class="params">
<tr>
<td class="first">e:<a href="class_tinymce.Editor.html">Editor</a>
</td>
<td class="last">Editor instance to remove.</td>
</tr>
</table>
<h4>Returns</h4>
<div class="returns">
<a href="class_tinymce.Editor.html">Editor</a> - The editor that got passed in will be return if it was found otherwise null.</div>
</div>
<div class="memberDetails last" id="triggerSave">
<h3>triggerSave<span class="memberType">method</span>
</h3>
<code class="syntax">public static 
						function triggerSave():void</code>
<div class="memberDescription">Calls the save method on all editor instances in the collection. This can be useful when a form is to be submitted.
</div>
</div>
</div>
</div>
</div>
</body>
</html>
